package com.qf.aop;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyMethodInterceptor implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {


        try {
            System.out.println("环绕通知: 开始辅助内容tx begin~~");
            Object ret = invocation.proceed();// 触发，执行核心功能
            System.out.println("环绕通知: 结尾复制内容tx end!!");
            return ret;
        } catch (Exception e) {
            e.printStackTrace();
        } finally {

        }

        return null;
    }
}
